//2009/08/21 18:01:35
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class TextStatistics
{
public:
    double averageLength(string text)
    {
        double sum = 0.0;
        int cnt = 0;
        string s;
        for (int i=0; i<text.size(); i++)
        {
            if (isalpha(text[i]))
                s += text[i];
            else
                s += " ";
        }
        stringstream ss(s);
        while (ss >> s)
        {
            cnt ++;
            sum += s.size();
        }
        //if (cnt == 0) return 0;
        return sum / cnt;
    }
};
